package com.mooc.house.biz.dao;

import com.mooc.house.common.model.Community;
import com.mooc.house.common.model.House;
import com.mooc.house.common.model.HouseUser;
import com.mooc.house.common.page.PageParams;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by 敲代码的卡卡罗特
 * on 2018/4/26 0:54.
 */
@Mapper
public interface HouseMapper {
    public List<House> selectPageHouses(@Param("house") House house, @Param("pageParams")PageParams pageParams);

    public Long selectPageCount(@Param("house") House query);


    List<Community> selectCommunity(Community community);

    void insert(House house);

    HouseUser selectHouseUser(@Param("userId") Long userId, @Param("houseId")Long houseId, @Param("type")Integer type);

    void insertHouseUser(HouseUser houseUser);

    HouseUser selectSaleHouseUser(Long houseId);

    void updateHouse(House updateHouse);

    void downHouse(Long id);

    public int deleteHouseUser(@Param("id")Long id,@Param("userId") Long userId,@Param("type") Integer value);
}
